'''
lst = [3, 5, 1, 6, 7, 34, 9, 2, 6,8]
从键盘输入一个数， 10，输出列表中的两个数相加结果为键盘输入的数的地址
'''

lst = [3, 5, 1, 6, 7, 34, 9, 2, 6, 8]

num = input("please input a number:")
# print(type(num))
a = 0
flag = 0
for i in lst:
    a += 1
    # print("\n")
    # print(i)
    b = 0
    for j in lst[a:]:
        b += 1
        # print(j, end="\t")
        if i + j == int(num):
            flag = 1
            print(f'你所输入的数由{i}和{j}相加，并且这两个数的地址是{a}和{b+a}')
            break
    if flag == 1:
        break



